package day0221;

public class Test6 {
    public static void main(String[] args) {
        for (int i = 1; i <= 5 ; i++) {
            //控制每一行左边的空格数
            for (int j = 0; j < 6-i; j++) {//i1    6-1
                System.out.print(" ");    //i2     6-2
                                         //i3      6-3
                                        //i4       6-4
                                        //i5       6-5
            }//控制每一行的星号和两个星号之间的空格
            for (int j = 1; j <= 2*i-1 ; j++) {
                if(j==1 || j == 2*i-1){
                    System.out.print("*");
                }else{
                    System.out.print(" ");
                }
            }
            System.out.println();
        }
        System.out.println("***********");

        for (int i = 1; i <= 5; i++) {
            for (int j = 0; j < 5; j++) {
                System.out.print(" ");
            }
            for(int j = 0; j < 1; j++){//1次
                System.out.print("*");
            }
            System.out.println();
        }



    }
}
